<template>
  <div class="detail-page">
    <div class="page-header">
      <div class="title-box">
        <el-button class="back-button" icon="el-icon-back" @click="goback">返回</el-button>
        <div class="page-title">会议详情</div>
      </div>
    </div>
    <div class="page-body">
      <el-descriptions direction="vertical" :column="2">
        <el-descriptions-item label="会议名称">{{ form.name }}</el-descriptions-item>
        <el-descriptions-item label="发布人">{{ form.publisherName }}</el-descriptions-item>
        <el-descriptions-item label="会议类型">{{ form.meetingTypeName }}</el-descriptions-item>
        <el-descriptions-item label="所属党组织">{{ form.partyOrgName }}</el-descriptions-item>
        <el-descriptions-item label="会议主持人">{{ form.meetingModeratorName }}</el-descriptions-item>
        <el-descriptions-item label="参会人员">{{ form.meetingLeaveVOList }}</el-descriptions-item>
        <el-descriptions-item label="开始时间">{{ form.startTime }}</el-descriptions-item>
        <el-descriptions-item label="会议地点">{{ form.meetingArea }}</el-descriptions-item>
        <el-descriptions-item label="是否可以请假">{{ form.isLeaveAbsence }}</el-descriptions-item>
        <el-descriptions-item label="是否需要审批">{{ form.isApproveal }}</el-descriptions-item>
        <el-descriptions-item :span="2" label="可签到时间设置">{{ form.checkStartTime }}~{{ form.checkEndTime }}</el-descriptions-item>
        <el-descriptions-item :span="2" label="会议音频文件">{{ form.name }}</el-descriptions-item>
        <el-descriptions-item label="会议附件">{{ form.name }}</el-descriptions-item>
      </el-descriptions>
      <div class="titleStyle">
        <span>会议议题</span>
      </div>
      <el-table
        :data="tableData"
      >
        <el-table-column align="center" type="index" label="序号" width="50" />
        <el-table-column prop="topicTitle" align="center" label="会议议题" />
        <el-table-column prop="topicTitle" align="center" label="是否需要表决（同意/不同意）" width="200">
          <template slot-scope="scope">
            {{ scope.row.isVote?'是':'否' }}
          </template>
        </el-table-column>
      </el-table>
      <div class="titleStyle">
        <span>活动集锦</span>
      </div>
      <div>
        <el-upload
          action="#"
          list-type="picture-card"
        >
          <i class="el-icon-plus"></i>
        </el-upload>
      </div>
    </div>
    <div class="page-footer">
      <el-button type="primary" size="mini" @click="deleteMeeting">确认修改</el-button>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      form: {},
      tableData: []
    }
  },
  methods: {
    init (row) {
      this.form = { ...row }
      this.tableData = row.meetingTopicsVOList
    },
    goback () {
      this.$emit('goback')
    },
    detailToEdit () {
      this.$emit('detailToEdit', this.form)
    },
    deleteMeeting () {}
  }
}
</script>
<style scoped lang="scss">
  .page-header {
    display: flex;
    height: 60px;
    align-items: center;
    border-bottom: 1px solid #ddd;
    justify-content: space-between;
    .title-box {
      display: flex;
      height: 60px;
      align-items: center;
    }
    .back-button {
      margin-right: 16px;
    }
    .page-title {
      font-size: 18px;
      font-weight: 600;
    }
  }
  .page-body {
    height: calc(100vh - 190px);
    padding-top: 16px;
    overflow-y: auto;
    position: relative;
    .organization-image-box {
      width: 240px;
      height: 180px;
      border: 1px solid #000;
      position: absolute;
      left: 50%;
      .organization-image {
        width: 100%;
        height: 100%;
      }
    }
    .titleStyle {
      font-weight: 600;
      height: 35px;
      line-height: 35px;
      padding-left: 10px;
      padding-right: 10px;
      margin-bottom: 8px;
      background-color: #d8eff9;
      display: flex;
      justify-content: space-between;
    }
  }
  .page-footer {
    height: 60px;
    text-align: center;
    line-height: 60px;
  }
</style>
